<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../vue.js"></script>
</head>

<body>
    <div id="app">

        <con></con>

        <textarea name="" id="" cols="30" rows="10" v-model="val2"></textarea>
    </div>
    <template id="tmp">
        <div>
            <input type="text" ref="value1">
            <button @click="inputchange">按钮</button>
        </div>
    </template>
    <script>
        var con = {
            template: "#tmp",
            methods: {
                inputchange() {
                    console.log
                }
            },


        }
        new Vue({
            el: "#app",
            data: {
                val2: ""
            },
            methods: {

            },
            components: {
                con
            },
            // update() {
            //     console.log(this.$refs.value1.value)
            //         // this.val2 =
            // }
        })
    </script>
</body>

</html>